package com.woniu.user.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.woniu.user.entity.WhiteList;
import com.woniu.user.service.WhiteListService;
import com.woniu.user.mapper.WhiteListMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service;

import java.util.ArrayList;

/**
 * @author hasee
 * @description 针对表【white_list】的数据库操作Service实现
 * @createDate 2025-01-09 19:29:35
 */
@Service
public class WhiteListServiceImpl extends ServiceImpl<WhiteListMapper, WhiteList>
        implements WhiteListService {

    @Autowired
    private StringRedisTemplate redisTemplate;

    @Override
    public boolean queryWhiteList(String path) {
        Object o = redisTemplate.opsForHash().get("whiteList", path);
        if (o != null) {
            return true;
        }
        return false;
    }
}




